package org.hcyspartnoc.demo.common.core.configuration;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "contrapsych")
public class ContrapsychConfiguration {
    private String tempFilesDir;
    private Stt stt;
    private Tts tts;
    private Chat chat;
    private Note note;
    private Topic topic;

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "contrapsych.tts")
    public static class Tts {
        private String url;
        private Double speed;
        private String format;
        private Integer maxRetries;
    }

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "contrapsych.stt")
    public static class Stt {
        private String url;
        private String authorization;
        private String model;
        private Integer maxRetries;
    }

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "contrapsych.chat")
    public static class Chat {
        private String url;
        private String model;
        private Double temperature;
        private Integer maxNewTokens;
        private Double topP;
        private Boolean stream;
        private Long memory;
        private Integer dailyFree;
        private Integer maxRetries;
    }

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "contrapsych.note")
    public static class Note{
        private String url;
        private Integer maxRetries;
    }

    @Data
    @Configuration
    @ConfigurationProperties(prefix = "contrapsych.topic")
    public static class Topic{
        private String imageUrl;
        private String textUrl;
    }
}